/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *                                                                  *
 *        *************************************************         *
 *        *©2021-2027 HT Corporation All rights reserved *          *
 *        *************************************************         *
 *                                                                  *
 * FileName    : ht_vpss.h                                          *
 *                                                                  *
 * Author      : linus                                              *
 *                                                                  *
 * Email       : luoyaojun@haitutech.com                            *
 *                                                                  *
 * Date        : 2022-9-2                                           *
 *                                                                  *
 * Description :                                                    *
 *                                                                  *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#ifndef __HT_VPSS_H
#define __HT_VPSS_H

#include "ht_type.h"

typedef HT_S32 (*ht_vpss_chn_get_frame_cb)(HT_S32 vpss_grp, HT_S32 vpss_chn, HT_VOID *user, HT_FRAME frame_out);

struct ht_vpss_config {

	struct rect vpss_grp;

	struct rect vpss_chn;
	
};

/*
**
**	@vpss_grp 组号
**	@vpss_chn 通道号
**	@width	当前通道输出的目标宽
**	@heigth 当前通道输出的目前高
**	@depth_cnt 需要从当前通道getchnframe时，需要将depth_cnt设置为大于0的值，建议8
*/
HT_S32 ht_vpss_chn_init(HT_U32 vpss_grp, HT_U32 vpss_chn, HT_U32 width, HT_U32 height, HT_PIXEL_FORMAT fmt,
                        HT_U32 u32Depth);
HT_S32 ht_vpss_group_enable_abs_crop(HT_S32 vpss_grp, struct rect *prect);

HT_S32 ht_vpss_chn_get_frame(HT_S32 vpss_grp, HT_S32 vpss_chn, ht_vpss_chn_get_frame_cb cb, void *user);
HT_S32 ht_vpss_chn_get_info(HT_S32 vpss_grp, HT_S32 vpss_chn, HT_S32 *fd, HT_S32 *width, HT_S32 *height);

HT_S32 ht_vpss_group_init(HT_U32 vpss_grp, HT_PIXEL_FORMAT src_pixel_format);
HT_S32 ht_vpss_exit(HT_U32 vpss_grp);

#endif
